/**
 * 
 */
package com.simple.datax.schedule.impl;

import org.springframework.stereotype.Service;

import com.simple.datax.api.Loader;
import com.simple.datax.schedule.Processor;

/**
 * @author paladin
 * 
 */
@Service
public class ScheduledProcessor implements Processor {
//	private final AtomicInteger counter = new AtomicInteger();
	

	private Loader loader;

	/*
	 * (non-Javadoc)
	 * 
	 * @see com.microlink.itil.schedule.Processor#process()
	 */
	@Override
	public void process() {
		loader.run();
//		System.out.println("processing next 10 at " + new Date());
//		for (int i = 0; i < 10; i++) {
//			try {
//				worker.process(new Test(counter.incrementAndGet()));
//			} catch (Exception e) {
//				System.out.println("eeee:" + e);
//			}
//		}
	}

	public Loader getLoader() {
		return loader;
	}

	public void setLoader(Loader loader) {
		this.loader = loader;
	}

}
